<#include "../../select.ftl" />
<#include "../../upload.ftl" />
<#include "../../display.ftl" />
<#assign shmsConstant = statics["cn.hfatec.shms.constants.ShmsConstant"]/>
<!DOCTYPE html>
<html>
<head>
    <title>客户详细信息</title>
    <script type="text/javascript">

        $(function () {
            showEmployee();
            showContrac();
            showLeave();
            showInduction();
            showAdjust();
            showAssess();
            showRelation();
            showCertificate();
            $(":input").attr("readonly", "readonly");
        });

        function refreshTable() {
            var employeeId = $("#employeeId").val();
            window.location.href = "${absoluteContextPath}/hr/hrEmployee/goView/" + employeeId;

        }
        function refreshList() {
            window.location.href = "${absoluteContextPath}/hr/hrEmployee/list";

        }


        //基本信息
        function showEmployee() {

            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrEmployee/ajaxEmployeeList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Employee").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
        //合同
        function showContrac() {

            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrContract/ajaxContracList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Contrac").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }

        //离职
        function showLeave() {
            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrLeave/ajaxLeaveList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Leave").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
        //入职
        function showInduction() {
            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrInduction/ajaxInductionList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Induction").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
        function showAdjust() {
            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrAdjust/ajaxAdjustList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Adjust").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
        function showAssess() {
            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrAssess/ajaxAssessList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Assess").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
        function showRelation() {
            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrRelation/ajaxRelationList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Relation").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
        function showCertificate() {
            var data = {};
            data.employeeId = $("#employeeId").val();
            var url = '${absoluteContextPath}/hr/hrCertificate/ajaxCertificateList';
            $.ajax({
                url: url,
                type: 'post',
                data: data,
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent_Certificate").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "数据加载异常！", type: "success"});
                    }
                }
            });
        }
    </script>
</head>
<body>
<div class="breadcrumbs">
    <ol class="breadcrumb">
        <li><a href="${absoluteContextPath}/home"><i class="fa fa-home"></i>首页</a></li>
        <li><a href="#">用户管理</a></li>
        <li class="active">综合查询</li>
    </ol>
</div>

<#--<@upload uploadBtnId="uploadPhotoBtn" success="uploadPhotoSuccess" fileType="jpg,png,gif,jpeg,bmp" ></@upload>-->

<div class="main">
    <div id="errorMessage"><#include "../../message.ftl" /></div>
    <!-- row -->

    <div class="row">
        <div class="col-md-12">
            <section class="tile">
                <!-- tile body -->
                <div class="tile-body">
                    <div class="form-horizontal">
                        <div class="row">
                            <div class="form-group col-md-3">
                                <label class="col-sm-4 control-label">员工号<sup
                                        style="color: red">*</sup></label>

                                <div class="col-sm-8">
                                    <input name="employeeId" value="${hrEmployee.employeeId!''}" type="text"
                                           class="form-control"/>
                                </div>
                            </div>

                            <div class="form-group col-md-3 ">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">姓名<sup
                                            style="color: red">*</sup></label>

                                    <div class="col-sm-8">
                                        <input name="employeeName" value="${hrEmployee.employeeName!''}" type="text"
                                               class="form-control"/>
                                        <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group col-md-3">
                                <label class="col-sm-4 control-label">身份证<sup
                                        style="color: red">*</sup></label>

                                <div class="col-sm-8">
                                    <input name="card" value="${hrEmployee.card!''}" type="text"
                                           class="form-control"/>
                                </div>

                            </div>
                            <div class="floatr">
                                <button type="button" class="btn btn-primary margin-15"
                                        style="position: relative;top:10px;right:20px;" onclick="refreshList();">返回
                                </button>
                                <input id="employeeId" name="employeeId" type="hidden" value="${hrEmployee.employeeId!''}"/>
                            </div>
                        </div>
                    </div>
                </div>

            </section>

            <!-- tile -->
            <section class="tile">

                <!-- tile widget -->
                <div class="tile-widget nopadding" style="background:none">
                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs tabdrop">
                        <li class="active"><a href="#employee-tab" data-toggle="tab">员工</a></li>
                        <li><a href="#contrac-tab" data-toggle="tab">合同</a></li>
                        <li><a href="#leave-tab" data-toggle="tab">离职</a></li>
                        <li><a href="#induction-tab" data-toggle="tab">入职</a></li>
                        <li><a href="#adjust-tab" data-toggle="tab">调整</a></li>
                        <li><a href="#assess-tab" data-toggle="tab">评估</a></li>
                        <li><a href="#relation-tab" data-toggle="tab">关系</a></li>
                        <li><a href="#certificate-tab" data-toggle="tab">培训</a></li></ul>
                    <!-- / Nav tabs -->
                </div>
                <!-- /tile widget -->

                <!-- tile body -->
                <div class="tile-body tab-content nopadding">

                    <div id="employee-tab" class="tab-pane fade in active padding-15">
                        <div class="table-responsive">
                            <form id="search_Employee_table" action="${absoluteContextPath}/hr/hrEmployee/ajaxEmployeeList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Employee">
                                </div>
                            </div>
                        </div>
                    </div>


                    <div id="contrac-tab" class="tab-pane fade  padding-15">
                        <div class="table-responsive">
                            <form id="search_Contrac_table" action="${absoluteContextPath}/hr/hrContract/ajaxContracList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Contrac">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="leave-tab" class="tab-pane fade padding-15">
                        <div class="table-responsive">
                            <form id="search_leave_table" action="${absoluteContextPath}/hr/hrLeave/ajaxLeaveList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Leave">
                                </div>
                            </div>
                        </div>
                    </div>

                  <div id="induction-tab" class="tab-pane fade padding-15">
                        <div class="table-responsive">
                            <form id="search_induction_table" action="${absoluteContextPath}/hr/hrInduction/ajaxInductionList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Induction">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="adjust-tab" class="tab-pane fade padding-15">
                    <div class="table-responsive">
                        <form id="search_adjust_table" action="${absoluteContextPath}/hr/hrAdjust/ajaxAdjustList"
                              method="post">
                            <input type="hidden" name="pageSize" value=""/>
                            <input type="hidden" name="currentPage" value=""/>
                            <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                        </form>
                        <div class="tile-body nopadding">
                            <div class="table-responsive" id="tableContent_Adjust">
                            </div>
                        </div>
                    </div>
                </div>

                    <div id="assess-tab" class="tab-pane fade padding-15">
                        <div class="table-responsive">
                            <form id="search_assess_table" action="${absoluteContextPath}/hr/hrAssess/ajaxAssessList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Assess">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="relation-tab" class="tab-pane fade padding-15">
                        <div class="table-responsive">
                            <form id="search_relation_table" action="${absoluteContextPath}/hr/hrRelation/ajaxRelationList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Relation">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="certificate-tab" class="tab-pane fade padding-15">
                        <div class="table-responsive">
                            <form id="search_certificate_table" action="${absoluteContextPath}/hr/hrCertificate/ajaxCertificateList"
                                  method="post">
                                <input type="hidden" name="pageSize" value=""/>
                                <input type="hidden" name="currentPage" value=""/>
                                <input type="hidden" name="employeeId" value="${hrEmployee.employeeId!''}"/>
                            </form>
                            <div class="tile-body nopadding">
                                <div class="table-responsive" id="tableContent_Certificate">
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- / Tab panes -->
                </div>
                <!-- /tile body -->

            </section>
            <!-- /tile -->
        </div>

    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    </div>
</div>
</body>

</html>
